﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Site.Master" AutoEventWireup="true"
    CodeBehind="GiftOrderAddress.aspx.cs" Inherits="FortuneHeaven.Web.Pages.Shop.GiftOrderAddress" %>

<%@ Register TagPrefix="uc1" TagName="SePagination" Src="~/Controls/SePagination.ascx" %>
<%@ Register Src="~/Controls/LoginPanel.ascx" TagName="login" TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="stylesheet" href="../../Content/CSS/public.css" />
    <link type="text/css" rel="stylesheet" href="../../Content/CSS/prizes.css" />
    <style type="text/css">
        .headpic .hcwdwp
        {
            background-image: url("../../Content/Image/Common/spbg-06.jpg");
            background-repeat: no-repeat;
            color: #4F5152;
            height: 36px;
            line-height: 36px;
            margin: 10px auto;
            text-align: center;
            width: 187px;
        }
        .headpic .hcye
        {
            color: #3B3B3B;
            height: 30px;
            line-height: 30px;
            margin: 10px auto 30px;
            width: 187px;
        }
        .headpic .hcye em
        {
            color: #ED5400;
        }
        .tpage
        {
            height: 40px;
            line-height: 40px;
            text-align: center;
        }
        .tpage .front
        {
            color: #414141;
        }
        .tpage .tl
        {
            color: #C27443;
        }
        .tpage a
        {
            color: #3B5A6E;
            margin: 0 10px;
        }
    </style>
    <style>
        .framlist
        {
            height: 40px;
            line-height: 40px;
            margin-top: 15px;
            width: 650px;
        }
        .framlist span
        {
            display: inline-block;
        }
        .framlist .left
        {
            text-align: right;
            width: 120px;
        }
        .framlist .right
        {
            width: 520px;
        }
        .framlist .right .text
        {
            border: 1px solid #CCCCCC;
            height: 35px;
            line-height: 35px;
            padding-left: 5px;
            width: 206px;
        }
        .framlist .right .tl
        {
            background-image: url("../../Content/Image/Common/acbg4.jpg");
            background-repeat: no-repeat;
            border: medium none;
            height: 37px;
            line-height: 37px;
        }
        .framlist .right em
        {
            background-color: #FFE1E1;
            color: #CB4445;
            display: inline-block;
            height: 35px;
            line-height: 35px;
            margin-left: 10px;
            padding-left: 5px;
            width: 100px;
        }
        .framlist .right .xg
        {
            color: #0082CB;
            margin-left: 40px;
        }
        .framlist .blue
        {
            color: #2864B4;
        }
        .onelink
        {
            background-image: url("../../Content/Image/Common/s2.gif");
            background-repeat: no-repeat;
            color: #FFFFFF;
            display: inline-block;
            height: 23px;
            line-height: 23px;
            margin-right: 10px;
            text-align: center;
            width: 52px;
        }
        .twolink
        {
            background-image: url("../../Content/Image/Common/s3.gif");
            background-repeat: no-repeat;
            color: #FFFFFF;
            display: inline-block;
            height: 23px;
            line-height: 23px;
            margin-right: 10px;
            text-align: center;
            width: 52px;
        }
        .top
        {
            background-image: url("../../Content/Image/Common/lgbg-03.jpg");
            background-position: left top;
            background-repeat: no-repeat;
            color: #0982A7;
            font-size: 14px;
            font-weight: bold;
            height: 45px;
            line-height: 45px;
            text-indent: 10px;
        }
    </style>
    <script type="text/javascript">
        function Showerror(el, error) {
            el.addClass("tl");
            el.next("em").remove();
            el.next("img").remove();
            el.after("<em style='*display:inline;  *zoom：1;vertical-align:middle;  width: 250px;'><img src='../../Content/Image/Main/acbg3.jpg'><span >" + error + "</span></em>");
            //el.after("<em style='width: 250px;'></em>");
        }
        function Clearerror(el) {
            el.removeClass("tl");
            el.next("em").remove();
            el.next("img").remove();
            el.after("<img style='width:38px;height:35px' src='../../Content/Image/Main/correct.jpg'>");
        }

        function CheckSub() {
            var name = $("#<%=txtName.ClientID%>");
            var address = $("#<%=txtAddress.ClientID%>");
            var mobile = $("#<%=txtMobile.ClientID%>");

            if (!mobile.val() || mobile.val() == "") {
                Showerror(mobile, "请输入手机号码");
                return false;
            } else {
                Clearerror(mobile);
            }

            if (!name.val() || name.val() == "") {
                Showerror(name, "请填写真实姓名");
                return false;
            }
            else {
                Clearerror(name);
            }

            if (!address.val() || address.val() == "") {
                Showerror(address, "请填写详细地址用于领取奖品");
                return false;
            }
            else {
                Clearerror(address);
            }

            return true;
        }
        $(document).ready(function () {
            var name = $("#<%=txtName.ClientID%>");
            var address = $("#<%=txtAddress.ClientID%>");
            var mobile = $("#<%=txtMobile.ClientID%>");

            mobile.blur(function () {
                if (!mobile.val() || mobile.val() == "") {
                    Showerror(mobile, "请输入手机号码");
                }
                else {
                    Clearerror(mobile);
                }
            });


            name.blur(function () {
                if (!name.val() || name.val() == "") {
                    Showerror(name, "请填写真实姓名");
                }
                else {
                    Clearerror(name);
                }
            });

            address.blur(function () {
                if (!address.val() || address.val() == "") {
                    Showerror(address, "请填写详细地址用于领取奖品");
                }
                else {
                    Clearerror(address);
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="subnav">
        <div class="con conone">
            </div>
    </div>
    <div id="main">
        <div class="mleft">
            <div class="headpic" id="divHeadpic" runat="server">
                <p>
                    <span class="left">用户名称:<asp:Literal ID="ltUserName" runat="server"></asp:Literal></span></p>
                <div class="picture">
                    <a href="javascript://">
                        <img id="imgHead" runat="server" class="useselectimg" style="width: 185px; height: 300px;"
                            src="../../Content/Image/Main/ssbg-03.jpg"></a></div>
                <div class="hcwdwp weight">
                    我的物品</div>
                <div class="hcye">
                    奖券余额：<em><asp:Literal ID="ltFortune" runat="server"></asp:Literal></em></div>
            </div>
        </div>
        <div class="mright">
            <div class="prizertit">
                <span class="left">奖品</span>
            </div>
            <div class="top">
                <asp:Literal ID="ltGiftName" runat="server"></asp:Literal>
            </div>
            <div class="body">
                <div class="framlist">
                    <span class="left">联系人：</span><span class="right">
                        <asp:TextBox CssClass="text" ID="txtName" runat="server"></asp:TextBox></span></div>
                <div class="framlist">
                    <span class="left">邮寄地址：</span><span class="right">
                        <asp:TextBox CssClass="text" ID="txtAddress" runat="server"></asp:TextBox></span></div>
                <div class="framlist">
                    <span class="left">电话号码：</span><span class="right">
                        <asp:TextBox CssClass="text" ID="txtMobile" runat="server"></asp:TextBox></span></div>
                <div class="framlist">
                    <span class="left"></span><span class="right">
                        <asp:LinkButton ID="LinkButton1" runat="server" CssClass="onelink" OnClick="PurchaseGift"
                            OnClientClick="return CheckSub();">提交</asp:LinkButton>
                        <a class="twolink" href="<%= Pre%>">返回</a></span></div>
            </div>
        </div>
        <div class="clear">
        </div>
    </div>
</asp:Content>
